﻿define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Distributor_sxqd_detail, $stateParams) {
		
		$scope.store_id = $stateParams.store_id;
		
		//初始化
		$scope.init_data = function() {
			Distributor_sxqd_detail.product_detail($scope.store_id, function(data) {
				$scope.list=data;
			});
		}
		$scope.init_data();
		
		//控制品牌的显示
		$scope.is_showbrand=function(index){
			$scope.list.brands[index].is_show=!$scope.list.brands[index].is_show;
		}

	}

	controller.$inject = ['$scope', 'Distributor_sxqd_detail', '$stateParams'];

	return app.registerController("distributor_sxqd_detailctrl", controller);
});